From 3854d519b574cf85d3e6ed833f18a8e5ccc03372 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Thu, 25 May 2006 14:37:55 +0100 Subject: [PATCH] Ensure trace-buffer size is set back to zero if trace buffers can't be allocated. Signed-off-by: Atsushi Sakai --- xen/common/trace.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/xen/common/trace.c b/xen/common/trace.c index dbd0f7e7a0..0cee7126d2 100644 --- a/xen/common/trace.c +++ b/xen/common/trace.c @@ -91,6 +91,7 @@ static int alloc_trace_bufs(void) if ( (rawbuf = alloc_xenheap_pages(order)) == NULL ) { printk("Xen trace buffers: memory allocation failed\n"); + opt_tbuf_size = 0; return -EINVAL; } @@ -135,10 +136,7 @@ static int tb_set_size(int size) opt_tbuf_size = size; if ( alloc_trace_bufs() != 0 ) - { - opt_tbuf_size = 0; return -EINVAL; - } printk("Xen trace buffers: initialized\n"); return 0; -- 2.30.2